/**
 * 
 */
package com.p2p.front.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import com.p2p.front.dal.model.AuthValue;
import com.p2p.front.dal.model.UserInfoAuth;
import com.p2p.user.enums.UserAuthName;

/**
 * @author ruiqi
 *
 */
public interface UserInfoAuthService {

	/**
	 * @author hongbo 保存邮箱验证通过
	 * @param uid
	 */
	void saveEmailAuth(String uid);

	public void saveAuthByValueMap(String userId,
			TreeMap<Integer, Character> authMap);

	/**
	 * 批量设置认证属性的值
	 * 
	 * @param userId
	 * @param authValueList
	 */
	public void saveAuthByAuthValueList(String userId,
			List<AuthValue> authValueList);

	public Map<Integer, Character> getAuthNameKeyList(String userId,
			Collection<Integer> authKeyList);

	/**
	 * 批量获取认证属性的值
	 * 
	 * @param userId
	 * @param authNameList
	 * @return
	 */
	public Map<Integer, Character> getAuthByEnumList(String userId,
			List<UserAuthName> authNameList);

	/**
	 * 初始化属性条
	 * 
	 * @param userId
	 * @param maxIndex
	 * @return
	 */
	public UserInfoAuth initAuth(String userId, int maxIndex);

	public UserInfoAuth getUserAuth(String userId);

	/**
	 * 进行实名认证
	 * 
	 * @param uid
	 *            用户id
	 * @param realname
	 *            真实姓名
	 * @param idNum
	 *            身份证号码
	 * @return
	 */
	public boolean authRealname(String uid, String realname, String idNum);

	/**
	 * 是否已经完成实名认证
	 * 
	 * @param uid
	 * @return
	 */
	public boolean isCompletedAuthRealname(String uid);
}
